package com.project.base.core.zookeeper;

/**
 * Zookeeper事件对象
 *
 * @author wxliyong
 */
public class ZNodeEvent {
    private String eventPath;
    private String eventType;
    private EventStatus status = EventStatus.ACTIVE;

    public String getEventPath() {
        return eventPath;
    }

    public void setEventPath(String eventPath) {
        this.eventPath = eventPath;
    }

    public String getEventType() {
        return eventType;
    }

    public void setEventType(String eventType) {
        this.eventType = eventType;
    }

    public EventStatus getStatus() {
        return status;
    }

    public void setStatus(EventStatus status) {
        this.status = status;
    }

    public enum EventStatus {
        EXPIRED(-1, "过期"),
        ACTIVE(1, "活跃");
        private int id;
        private String cnName;

        private EventStatus(int id, String cnName) {
            this.id = id;
            this.cnName = cnName;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getCnName() {
            return cnName;
        }

        public void setCnName(String cnName) {
            this.cnName = cnName;
        }
    }
}
